<?php
 defined('RUN')or die('No access');class UserAgent{public static function isMobile(){$a='!(tablet|pad|mobile|iphone|symbian|android|ipod|ios|blackberry|webos)!i';$b=array();if(preg_match($a,$_SERVER['HTTP_USER_AGENT'],$b)){return $b[0];}return FALSE;}public static function isBot(){$c=array(array('Google','Google'),array('msnbot','MSN'),array('Rambler','Rambler'),array('Yahoo','Yahoo'),array('AbachoBOT','AbachoBOT'),array('accoona','Accoona'),array('AcoiRobot','AcoiRobot'),array('ASPSeek','ASPSeek'),array('CrocCrawler','CrocCrawler'),array('Dumbot','Dumbot'),array('FAST-WebCrawler','FAST-WebCrawler'),array('GeonaBot','GeonaBot'),array('Gigabot','Gigabot'),array('Lycos','Lycos spider'),array('MSRBOT','MSRBOT'),array('Scooter','Altavista robot'),array('AltaVista','Altavista robot'),array('IDBot','ID-Search Bot'),array('eStyle','eStyle Bot'),array('Scrubby','Scrubby robot'));foreach($c as $d){if(stristr($_SERVER['HTTP_USER_AGENT'],$d[0])){return $d[1];}}return FALSE;}}